<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
  <title>订阅通知</title>
  <!--link-->
  <link rel="stylesheet" href="../../lib/bootstrap-5.1.3-dist/css/bootstrap.css">
  <link rel="stylesheet" href="../../lib/weui/weui.css">
  <link rel="stylesheet" href="../mycss.css">
  <script src="../../lib/jquery/jquery-3.6.1.js"></script>
  <script src="../../lib/axios/axios.js"></script>
  <script src="../../util/httpRequest.js"></script>
  <script src="../../lib/vue/vue.js"></script>
  <script src="../../lib/wx-web/jweixin-1.6.0.js"></script>
  <script src="../../util/wx-config.js"></script>
  <style>
    .wxOpenTag-btn{
      position: relative;
      display: block;
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 10px;
    }
  </style>
</head>
<body data-weui-theme="light">
<div id="root">
  <div class="weui-cells__title">订阅通知</div>
  <wx-open-subscribe template="xpalM_l22wC4jBGy1VYJpshNOc-RzS4YdxK7h4jzw2M" id="subscribe-btn"
                     class="wxOpenTag-btn">
    <script type="text/wxtag-template" slot="style">
      <style>
        .btn{
          position: relative;
          display: block;
          margin-left: auto;
          margin-right: auto;
          box-sizing: border-box;
          min-width: 150px;
          font-weight: 600;
          font-size: calc(1rem + 0.5vw);
          text-align: center;
          text-decoration: none;
          color: #fff;
          border-radius: 8px;
          background-color: #07c160;
          border-style: none;
          line-height: 3;
          white-space: nowrap;
          cursor: pointer;
          outline: 0;
          font-family: system-ui,-apple-system,Helvetica Neue,sans-serif;
        }
      </style>
    </script>
    <script type="text/wxtag-template">
      <button class="btn">
        一次性订阅通知
      </button>
    </script>
  </wx-open-subscribe>
  <wx-open-subscribe template="VSy8CBKGF2odWE_phaxOoWvahg4C1TUAW0ABvYqMylU" id="subscribe-btn"
                     class="wxOpenTag-btn">
    <script type="text/wxtag-template" slot="style">
      <style>
        .btn{
          position: relative;
          display: block;
          margin-left: auto;
          margin-right: auto;
          box-sizing: border-box;
          min-width: 150px;
          font-weight: 600;
          font-size: calc(1rem + 0.5vw);
          text-align: center;
          text-decoration: none;
          color: #fff;
          border-radius: 8px;
          background-color: #07c160;
          border-style: none;
          line-height: 3;
          white-space: nowrap;
          cursor: pointer;
          outline: 0;
          font-family: system-ui,-apple-system,Helvetica Neue,sans-serif;
        }
      </style>
    </script>
    <script type="text/wxtag-template">
      <button class="btn">
        长期订阅通知
      </button>
    </script>
  </wx-open-subscribe>
</div>
<script>
  let btn = document.getElementById('subscribe-btn');
  btn.addEventListener('success', function (e) {
    console.log('success', e.detail);
  });
  btn.addEventListener('error',function (e) {
    console.log('fail', e.detail);
  });
</script>
<script type="text/javascript">
  //Vue.config.ignoredElements = f
  const vm = new Vue({
    el:'#root',
    data:{
    
    },
    methods: {
    }
  })
</script>
</body>
</html>